﻿using GWSoft.Framework.Core.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace GWSoft.Framework.WebSite.Models
{
    /// <summary>
    /// 组织机构类
    /// </summary>
    [Table(name:"SYS_Organize")]
    public class Organize : IBaseModel<string>
    {
        /// <summary>
        /// 机构Id
        /// </summary>
        [Key]
        [Column("OrgId")]
        [StringLength(maximumLength: 32)]
        [Description("机构Id")]
        public string Id { get; set; }

        /// <summary>
        /// 父机构
        /// </summary>
        [Required]
        [StringLength(maximumLength: 32)]
        public string ParentId { get; set; }

        /// <summary>
        /// 机构名称
        /// </summary>
        [Required]
        [StringLength(maximumLength: 80)]
        public string OrgName { get; set; }

        /// <summary>
        /// 机构代码
        /// </summary>
        [StringLength(maximumLength: 30)]
        public string OrgCode { get; set; }

        /// <summary>
        /// 机构简称
        /// </summary>
        [StringLength(maximumLength: 20)]
        public string OrgShortName { get; set; }

        /// <summary>
        /// 地区代码
        /// </summary>
        [StringLength(maximumLength: 6)]
        public string AreaCode { get; set; }

        /// <summary>
        /// 区县代码
        /// </summary>
        [StringLength(maximumLength: 10)]
        public string County { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [StringLength(maximumLength: 200)]
        public string Comments { get; set; }

        /// <summary>
        /// 顺序号
        /// </summary>
        [Required]
        [Column(name:"OrderNo", TypeName = "decimal")]
        public int OrderNo { get; set; }
    }
}
